/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common;

/**
 * Dipoes de metodos para coversao entre dois tipos de dados.
 * @author Glauco Knihs
 * @param <S> Tipo de Dado principal.
 * @param <T> Outro Tipo de Dado.
 */
public interface Converter<S,T> {

    /**
     * Converte o tipo principal para o outro tipo de dado.
     * @param value Valor para ser convertido.
     * @return Valor convertido para o outro tipo de dado.
     */
    public T convertForward(S value) throws ConverterException;

    /**
     * Converte o outro tipo de dado no tipo principal.
     * @param value Valor para ser convertido.
     * @return Valor convertido para o tipo de dado principal.
     */
    public S convertReverse(T value) throws ConverterException;
}
